package day9;

/**
 * @author oldliu
 * @since 1.0
 */
public class BigCar extends Vechile {
    //座位数
    private int seats;

    public BigCar(){

    }
    public BigCar(String licensePlate, String brand, double dailyRent, int seats) {
        super(licensePlate, brand, dailyRent);
        this.seats = seats;
    }

    public int getSeats() {
        return seats;
    }

    public void setSeats(int seats) {
        this.seats = seats;
    }

    @Override
    public void show() {
        System.out.print("客车：车牌 "+this.getLicensePlate()+",品牌："+this.getBrand()+",日租金：￥"+this.getDailyRent()+"元,"+"座位数是"+seats+"座"+",当前"+(super.isState()?"可租":"已出租"));
        System.out.println();
    }

    @Override
    public double calcMoney(int days) {
        double m = this.getDailyRent() * days;
        if (days > 150)
            m *= 0.6;
        else if (days > 30)
            m *= 0.7;
        else if (days > 7)
            m *= 0.8;
        else if (days > 3)
            m *= 0.9;
        return m;
    }
}
